#pragma once
#include <odb/core.hxx>
#include <odb/nullable.hxx>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <string>

#pragma db object
class ChatSessionMember {
public:
    ChatSessionMember() = default;
    ChatSessionMember(const std::string &chat_session_id, const std::string &user_id) 
        : _chat_session_id(chat_session_id)
        , _user_id(user_id)
    {}

    std::string chat_session_id() const { return _chat_session_id; }
    std::string user_id() const { return _user_id; }

    void set_chat_session_id(const std::string &chat_session_id) { _chat_session_id = chat_session_id; }
    void set_user_id(const std::string &user_id) { _user_id = user_id; }
private:
    friend class odb::access;
    #pragma db id auto
    unsigned long _id;
    #pragma db type("varchar(32)") index
    std::string _chat_session_id; // 聊天会话 ID
    #pragma db type("varchar(32)")
    std::string _user_id; // 用户 ID
}; 
